﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Common.Enums;
using ZBJF.Warranty.Model;

namespace ZBJF.Warranty.IBLL
{
    public partial interface IPageMenuService
    {
        PageMenu Load(int id);
        bool IsExist(byte applicationType, string pageName, int parentId, int id = 0);
        /// <summary>
        /// 根据应用类型获取该应用的所有菜单
        /// </summary>
        /// <param name="applicationType">应用类型</param>
        /// <param name="isShow"></param>
        /// <returns></returns>
        IQueryable<PageMenu> LoadBy(ApplicationType applicationType, bool isShow);
        string GetFullPageMenuName(int id);
        PageMenu GetParentPageMenu(int id);
        /// <summary>
        /// 获取所有的子菜单ID(包含本身）
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<int> GetAllChildrenPageID(int id);

        /// <summary>
        /// 根据应用类型和父级菜单获取子集菜单
        /// </summary>
        /// <param name="applicationType">应用类型</param>
        /// <param name="parentId">父级菜单ID</param>
        /// <param name="isShow"></param>
        /// <returns></returns>
        IQueryable<PageMenu> LoadBy(ApplicationType applicationType, int parentId, bool isShow);
        IQueryable<PageMenu> LoadAllPageMenus();
    }
}
